package com.zhaoxi.boot.demo.bootlesson1.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @author ZXM
 * @description TODO
 * @date 2024/3/4 0:03
 */
@Component
@ConfigurationProperties(prefix = "friends")
public class Friends {
    private String lastName;
    private int age;
    private List<String> pets;
    private Map<String,Object> conditional;

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Friends{" +
                "lastName='" + lastName + '\'' +
                ", age=" + age +
                ", pets=" + pets +
                ", conditional=" + conditional +
                '}';
    }

    public Map<String, Object> getConditional() {
        return conditional;
    }

    public void setConditional(Map<String, Object> conditional) {
        this.conditional = conditional;
    }

    public List<String> getPets() {
        return pets;
    }

    public void setPets(List<String> pets) {
        this.pets = pets;
    }
}
